<template>
  <div class="header-actions">
    <el-button @click="navigateBack">
      <el-icon><ArrowLeft /></el-icon>返回列表
    </el-button>
    <el-button type="primary" @click="submitClip" :loading="submitting">
      <el-icon><VideoPlay /></el-icon>开始拆条
    </el-button>
  </div>
</template>

<script setup>
import { VideoPlay, ArrowLeft } from '@element-plus/icons-vue'
import { defineProps, defineEmits } from 'vue'

const props = defineProps({
  submitting: {
    type: Boolean,
    default: false
  }
})

const emit = defineEmits(['navigateBack', 'submitClip'])

const navigateBack = () => {
  emit('navigateBack')
}

const submitClip = () => {
  emit('submitClip')
}
</script>

<style scoped>
.header-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 1px;
  gap: 10px;
  width: 100%;
}

.header-actions .el-button {
  background-color: #e6f7ff;
  border-color: #91d5ff;
  color: #1890ff;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  height: 24px;
  transition: all 0.3s ease;
}

.header-actions .el-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.header-actions .el-button--primary {
  background-color: #e6f7ff;
  border-color: #91d5ff;
  color: #1890ff;
}

.header-actions .el-button--primary:hover {
  background-color: #bae7ff;
  border-color: #69c0ff;
}

@media (max-width: 768px) {
  .header-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
}
</style>